Programmable logic controller device and method for controlling the same

ABSTRACT

Provided are a PLC device and a method for controlling the same. The method includes: receiving input data from an external; storing the received input data in an input area of a data input/output unit; reading the input data from the input area of the data input/output unit in order to perform a calculation operation; storing output data, which is a result of the calculation operation, in an output area of the data input/output unit; and transmitting the output data in the output area of the data input/output unit to an output circuit.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application claims priority under 35 U.S.C. 119 and 35U.S.C. 365 to Korean Patent Application No. 10-2011-0092680, filed on 14Sep., 2011, which is hereby incorporated by reference in its entirety.

BACKGROUND

The present disclosure relates to a Programmable Logic Controller (PLC)device and a method for controlling the same.

The present disclosure relates to a Programmable Logic Controller (PLC)device and a method for controlling the same. More specifically, thepresent disclosure relates to a PLC device for outputting a performanceresult while a sequence program is performed with a plurality ofcalculation processes, and a method for controlling the same. Unlike atypical PLC sequence program (which accesses a memory in order to outputa calculation result), the method accesses an Application SpecificIntegrated Circuit (ASIC) in order to output a calculation result, sothat confirmation may be made on the calculation result while a sequenceprogram is performed.

A PLC is a highly autonomous control device, which replaces a relaycontrol board function such as a relay timer and a counter in aconventionally-used control board with a semiconductor device such as aLarge Scale Integration (LSI) chip and a transistor in order to add amathematical function to a basic sequence control function for a programcontrol, and scans the start and end of a program in a memory to performa logic operation.

FIGS. 1 and 2 are views illustrating a configuration of a typical PLCdevice.

As shown in FIGS. 1 and 2, the typical PLC device includes an inputcircuit 200, a control unit 100, and an output circuit 300.

The input circuit 200 receives an input signal or input data from anexternal. The input circuit 200 may include resistors R1 and R2connected in series and parallel, a data input unit 220 for deliveringan input signal to the control unit 100, and a first photo coupler 210.The first photo coupler 210 completely insulates the input circuit 200from the output circuit 230, thereby delivering an input signal butpreventing an external disturbance signal from being delivered to thecontrol unit 100.

The output circuit 300 outputs output data, i.e. a calculation result onthe input data. The output circuit 300 may include a second photocoupler 310, a resistor R3, a switching device 320, and a data outputunit 330.

The control unit 100 performs a calculation operation on the input dataand controls other data inputs/outputs. The control unit 100 includes acontroller 110 for controlling the data input unit 220 and the dataoutput unit 330 and a memory 120 for storing input/output data.

The data input unit 220 and the data output unit 330 may use an ASIC ora Field Programmable Gate Array (FPGA).

When the ASIC is used, it includes a storage area for temporarilystoring data to be processed internally. Additionally, an address foraccess is assigned to the storage area. When accessing the data inputunit 220, the controller 110 has an address for a specific area in thedata input unit 220. In the same manner, when accessing the data outputunit 330, the controller 110 has an address for a specific area in thedata output unit 330.

As shown in FIG. 1, according to a conventional way, when the controller110 reads input data, the input data are stored in the memory 130 first;a chip selection command CS and a read command RD are delivered to thedata input unit 220; and then, the data input unit 220 reads the inputdata from the memory 120.

Additionally, as shown in FIG. 2, according to a conventional way, whendata are outputted to an external, a writing command WR is delivered tothe data output unit 330 in order to be recorded on a memory; theaddress of data to be outputted and a read command RD are delivered tothe data output unit 330; and then, the data output unit 330 reads thedata to be outputted from the memory and delivers them to an external.

That is, a conventional PLC device has an issue in terms of wastingmemory space.

Moreover, in general, a conventional PLC device does nottransmit/receive data to/from an input/output port during a programcalculation operation. Since all program calculation operations need tobe completed before data are outputted and a calculation result isconfirmed, input/output data loss occurs.

For example, when data are stored in an output image area of ani-address at least two times during a program calculation operation, thelast stored data are outputted to an output port. Accordingly, when anoutput of the i-address is required to be changed N times during programexecution, the program needs to be programmed in order to be performedat least N times.

When j-address input data are changed during an N^(th) programcalculation operation, since a j-address input image area is updatedbefore an N+1^(th) program calculation operation, the changed data maynot be used in the N^(th) program calculation operation.

If the data, which are changed during the N^(th) program calculationoperation, are changed again before the N^(th) program calculationoperation is finished, it is not recognized that the input is changedduring program execution.

SUMMARY

Embodiments provide a PLC device for confirming a calculation resultduring calculation execution and requiring no memory, and a method forcontrolling the same.

In one embodiment, a method for controlling a Programmable LogicController (PLC) includes: receiving input data from an external;storing the received input data in an input area of a data input/outputunit; reading the input data from the input area of the datainput/output unit in order to perform a calculation operation; storingoutput data, which is a result of the calculation operation, in anoutput area of the data input/output unit; and transmitting the outputdata in the output area of the data input/output unit to an outputcircuit.

The transmitting of the output data into the output circuit may beperformed when the output data are stored in the output area accordingto the calculation operation.

The data input/output unit may be an Application Specific IntegratedCircuit (ASIC).

The input area is may be an area corresponding to an input address ofthe data input/output unit.

The output area may be an area corresponding to an output address of thedata input/output unit.

The method may further include performing a calculation operation oninput data changed according to whether the input data are changed, andtransmitting output data according to the result of the calculationoperation to the output circuit.

In another embodiment, a PLC device includes: a data input unit forreceiving input data inputted from an external and storing the receivedinput data in an input area; a data output unit for receiving outputdata according to a result of a calculation operation on the input dataand storing the received output data in an output area; and a controlunit for reading the input data from the input area of the data inputunit in order to perform a calculation operation, and according thereto,storing output data according to a result of the performed calculationoperation in the output area of the data output unit.

The control unit may transmit an address command, a CHIP SELECTION (CS)command, and a READ (RD) command on input data to the data input unit inorder to read the input area of the data input unit and read input dataaccording to a result of the reading operation.

The control unit may transmit an address command, a CS command, and aWRITING (WR) command on output data to the data output unit in order tostore the output data in the output area.

When output data are stored in the output area of the data output unit,the control unit may transmit the stored output data to an outputcircuit.

The input area may be an area corresponding to an input address of thedata input unit.

The output area may be an area corresponding to an output address of thedata output unit.

When the input data stored in the input area are changed, the controlunit may perform a calculation operation on the changed input data, andmay store a result of the performed calculation operation in the outputarea.

At least one of the data input unit and the data output unit may includea photo coupler in order to be insulated from the control unit.

The data input unit and the data output unit may be an ApplicationSpecific Integrated Circuit (ASIC).

The details of one or more embodiments are set forth in the accompanyingdrawings and the description below. Other features will be apparent fromthe description and drawings, and from the claims.

BRIEF DESCRIPTION OF THE DRAWINGS

FIGS. 1 and 2 are views illustrating a configuration of a typical PLCdevice.

FIG. 3 is a view illustrating a configuration of a PLC device accordingto an embodiment of the present invention.

FIG. 4 is a view illustrating a configuration and operations of acontrol unit and an input circuit according to an embodiment of thepresent invention.

FIG. 5 is a view illustrating a configuration and operations of acontrol unit and an input circuit according to an embodiment of thepresent invention.

FIG. 6 is a flowchart illustrating operations of a PLC device accordingto an embodiment of the present invention.

FIG. 7 is a view illustrating an example of source codes to implement anoperation of a PLC device according to an embodiment of the presentinvention.

DETAILED DESCRIPTION OF THE EMBODIMENTS

Suggested embodiments will be described below.

Hereinafter, detailed embodiments of the present invention will bedescribed with reference to the accompanying drawings. The inventionmay, however, be embodied in many different forms and should not beconstrued as being limited to the embodiments set forth herein; rather,that alternate embodiments included in other retrogressive inventions orfalling within the spirit and scope of the present disclosure can easilybe derived through adding, altering, and changing, and will fully conveythe concept of the invention to those skilled in the art.

The terms used in the present invention are selected from currentlywidely used general terms. However, the applicant may arbitrarily selectthe terms in certain cases, and their meanings are described in thedetailed description of the embodiments. Therefore, the terms should beunderstood with their meanings not names

That is, in the description below, the meaning of “include,” “comprise,”“including,” or “comprising,” specifies a property, a region, a fixednumber, a step, a process, an element and/or a component but does notexclude other properties, regions, fixed numbers, steps, processes,elements and/or components.

Hereinafter, embodiments of the present invention will be described withreference to the accompanying drawings.

FIG. 3 is a view illustrating a configuration of a Programmable LogicController (PLC) device according to an embodiment of the presentinvention.

As shown in FIG. 3, the PLC device includes an input circuit 20 forreceiving an input signal or input data, a control unit 10 forperforming calculation on the input data and controlling other datainputs/outputs, and an output circuit 30 for outputting output data,i.e. a calculation result on the input data.

The input circuit 20 is a circuit for receiving data that the PLC deviceis to process. The input circuit 20 receives data to be processed anddelivers them to the control unit 10. Input data may vary according toan application field to which the PLC device is applied. For example,the input data may include the temperature of a factory, the height of arobot arm installed at a factory, and the speed of a conveyer belt thatconveys products.

The output circuit 30 is a circuit for outputting a processing resultprocessed by the control unit 10. The output circuit 30 receives aprocessing result on input data from the control unit 10, and then,outputs it to an external. A processing result on input data may alsovary according to an application field of the PLC device.

For example, if the PLC device controls a temperature, a calculationresult may include an air conditioning operation or a heater operationaccording to a measured surrounding temperature.

Additionally, if the PLC device controls the height of a robot arm, acalculation result may include a command for raising the robot arm or acommand for lowering the robot arm.

FIG. 4 is a view illustrating a configuration and operations of acontrol unit 10 and an input circuit 20 according to an embodiment ofthe present invention.

Once input data are received from an external, according to aconventional way, the received input data are recorded on a memoryfirst. But, according to the present invention, a procedure forrecording data on a memory is omitted.

That is, in relation to the PLC device according to the presentinvention, a process for storing input data on a memory is omitted, andaccordingly, no memory for data processing is required. At this point,the memory may be used as another purpose, i.e. storing a command codefor controlling an operation of the control unit 10.

As shown in FIG. 4, the input circuit 20 includes resistors R1 and R2connected in series and parallel, a first photo coupler 21, and a datainput unit 22.

The first photo coupler 21 delivers a signal but prevents an externaldisturbance signal from being delivered to the control unit 10.

The data input unit 22 may use an ASIC or an FPGA. The ASIC may havearbitrary types such as a custom type IC, a gate array type IC, and asemi-custom type IC. The semi-custom type IC includes a standard celltype in which a semi-finished product includes a chip with preconfiguredbasic components such as a counter, a timer, and a flip-flop and thecomponents are connected in the chip to form a desired circuit.

When the ASIC is used, it includes a storage area for temporarilystoring data to be processed internally. Additionally, an address foraccess is assigned to the storage area. When accessing the data inputunit 22, the controller 10 has an address for an input area in the datainput unit 22.

For example, as shown in FIG. 4, when reading input data, the controlunit 10 directly reads the input data from the data input unit 22 byusing the address of the data input unit 22 in addition to chipselection and read commands CS and RD.

That is, according to a conventional way, in order for the control unit10 to read input data, the input data are stored in a memory first, theCS and RD commands are delivered to the ASIC, and then, the ASIC readsthe input data from the memory.

However, according to the present invention, the control unit 10temporarily stores input data in the input area of the data input unit22, and directly reads the input data through the address for the inputarea of the data input unit 22.

FIG. 5 is a view illustrating a configuration and operations of acontrol unit 10 and an output circuit 30 according to an embodiment ofthe present invention.

Like a process for receiving input data, a memory is not used whenprocessed data are outputted to an external.

According to a conventional way, when data are outputted to an external,a writing command WR is delivered to the data output unit 330 in orderto be recorded on a memory; the address of data to be outputted and aread command RD are delivered to the data output unit 33; and then, thedata output unit 33 reads the data to be outputted from the memory anddelivers them to an external. However, according to the presentinvention, the memory is not used to output the data to an external.

That is, in the PLC device according to the present invention, a datastoring process to read data to be outputted from a memory is omitted,and data to be outputted in direct access to the data output unit 33 arerecorded (stored) in the output area of the data output unit 33. Thedata output unit 33 outputs the data recorded therein. Accordingly, nomemory for data processing is required.

As shown in FIG. 5, the output circuit 30 includes a second photocoupler 31, a resistor R3, and a switching device 32.

According to an embodiment of the present invention, the data input unit22 may be separated from the data output unit 33, but may be configuredto be one.

FIG. 6 is a flowchart illustrating operations of a PLC device accordingto an embodiment of the present invention.

In relation to an operation of the PLC device, when a plurality ofcalculations are included in a PLC sequence command, or input data arechanged during one sequence operation, an output result on each of theplurality of calculations or a calculation result on the changed inputdata may be outputted.

The input circuit 20 receives input data from an external in operationS11.

The received input data are temporarily stored in the input area, i.e.an area where input data are stored, of the input unit 22 in the controlunit 10 in operation S12.

The control unit 10 transmits a control command to the input area of thedata input unit 22 in order to read input data through a process forreading the input area of the data input unit 22.

The data input unit 22 may use an ASIC or an FPGA. The ASIC may havearbitrary types such as a custom type IC, a gate array type IC, and asemi-custom type IC. The semi-custom type IC includes a standard celltype in which a semi-finished product includes a chip with preconfiguredbasic components such as a counter, a timer, and a flip-flop and thecomponents are connected in the chip to form a desired circuit.

When the ASIC is used, it is a circuit for performing a calculationprocess but includes a storage area for temporarily storing data to beprocessed internally. Additionally, an address for access is assigned tothe storage area. When accessing the data input unit 22, the controller10 has an address for an input area in the data input unit 22.

The control command includes an address command and chip selection andread commands CS and RD on data to be read.

The control unit 10 performs calculation on the read input data inoperation S13. Then, the control unit 10 stores a calculation result onthe input data in the output area of the data output unit 33.

The control unit 10 transmits a control command to the data output unit33, and then, stores the output data in the output area of the dataoutput unit 33 in operation S14.

The control command includes an address command and chip selection andwrite commands CS and WR on data to be outputted.

Then, the control unit 10 transmits the output data recorded in theoutput area of the data output unit 33 to the output circuit 30 inoperation S15. The output circuit 30 allows an external connectiondevice to perform an operation corresponding to input data by using thereceived output data.

According to the above-mentioned method for controlling a PLC device,since the control unit 10 directly reads or writes data from or on thedata input unit 22 and the data input unit 22 used for input/output portcontrol, input/output data are updated during a program operation,thereby preventing input/output data loss and reducing a waste of memoryused as an input/output image area.

FIG. 7 is a view illustrating an example of source codes to implement anoperation of a PLC device according to an embodiment of the presentinvention.

An input ASIC address of FIG. 7 indicates the input area of the datainput unit 22 and an output ASIC address indicates the output area ofthe data output unit 33.

Unlike a conventional way that reads the input image area of a memoryduring a program operation for reading input data, a first command 41directly reads ‘0xA00000’, i.e. an address of the input area in an ASIC.

A second command 42 has a format for writing data in ‘0xB000000’, i.e.the output area of the ASIC when a data output program is performed.

Although embodiments have been described with reference to a number ofillustrative embodiments thereof, it should be understood that numerousother modifications and embodiments can be devised by those skilled inthe art that will fall within the spirit and scope of the principles ofthis disclosure. More particularly, various variations and modificationsare possible in the component parts and/or arrangements of the subjectcombination arrangement within the scope of the disclosure, the drawingsand the appended claims. In addition to variations and modifications inthe component parts and/or arrangements, alternative uses will also beapparent to those skilled in the art.

1. A method for controlling a Programmable Logic Controller (PLC)comprising: receiving input data from an external; storing the receivedinput data in an input area of a data input/output unit; reading theinput data from the input area of the data input/output unit in order toperform a calculation operation; storing output data, which is a resultof the calculation operation, in an output area of the data input/outputunit; and transmitting the output data in the output area of the datainput/output unit to an output circuit.
 2. The method according to claim1, wherein the transmitting of the output data into the output circuitis performed when the output data are stored in the output areaaccording to the calculation operation.
 3. The method according to claim1, wherein the data input/output unit is an Application SpecificIntegrated Circuit (ASIC).
 4. The method according to claim 1, whereinthe input area is an area corresponding to an input address of the datainput/output unit.
 5. The method according to claim 1, wherein theoutput area is an area corresponding to an output address of the datainput/output unit.
 6. The method according to claim 1, furthercomprising performing a calculation operation on input data changedaccording to whether the input data are changed, and transmitting outputdata according to the result of the calculation operation to the outputcircuit.
 7. A PLC device comprising: A data input unit for receivinginput data inputted from an external and storing the received input datain an input area; a data output unit for receiving output data accordingto a result of a calculation operation on the input data and storing thereceived output data in an output area; and a control unit for readingthe input data from the input area of the data input unit in order toperform a calculation operation, and according thereto, storing outputdata according to a result of the performed calculation operation in theoutput area of the data output unit.
 8. The PLC device according toclaim 7, wherein the control unit transmits an address command, a CHIPSELECTION (CS) command, and a READ (RD) command on input data to thedata input unit in order to read the input area of the data input unitand read input data according to a result of the reading operation. 9.The PLC device according to claim 7, wherein the control unit transmitsan address command, a CS command, and a WRITING (WR) command on outputdata to the data output unit in order to store the output data in theoutput area.
 10. The PLC device according to claim 9, wherein, whenoutput data are stored in the output area of the data output unit, thecontrol unit transmits the stored output data to an output circuit. 11.The PLC device according to claim 7, wherein the input area is an areacorresponding to an input address of the data input unit.
 12. The PLCdevice according to claim 7, wherein the output area is an areacorresponding to an output address of the data output unit.
 13. The PLCdevice according to claim 7, wherein, when the input data stored in theinput area are changed, the control unit performs a calculationoperation on the changed input data, and stores a result of theperformed calculation operation in the output area.
 14. The PLC deviceaccording to claim 7, wherein at least one of the data input unit andthe data output unit comprises a photo coupler in order to be insulatedfrom the control unit.
 15. The PLC device according to claim 7, whereinthe data input unit and the data output unit are an Application SpecificIntegrated Circuit (ASIC).